using ValidationFramework.Configuration.Xml;
using ValidationFramework.Configuration;

namespace ValidationFramework.Specifications
{
    /// <summary>
    /// A <see cref="IRuleConfigReader"/> that creates a <see cref="RequiredBoolRule"/> from a <see cref="RuleData"/>.
    /// </summary>
    /// <remarks>
    /// <see cref="RuleData"/> for default attributes.
    ///   No extra elements or attributes.
    /// </remarks>
    /// <example>
    /// <code lang="xml" title="This example shows an xml configuration for RequiredBoolRuleConfigReader">
    /// <rule 
    /// errorMessage="hello" 
    /// typeName="RequiredBoolRule"/>
    /// </code>
    /// </example>
    /// <seealso cref="RequiredBoolRule"/>
    /// <seealso cref="ConfigurationService"/>
    public sealed class IsRequiredBoolParser : ISpecificationXmlParser
    {
		// --- Methods
		public ISpecification GetSpecification(System.Xml.XmlElement SpecificationElement, RuleContext member)
		{
			return new IsRequiredSpec<bool>();
		}
	}
}